<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.20"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>JCSDK Objective-C API Reference for iOS/macOS: &lt;JCClientCallback&gt;协议 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">JCSDK Objective-C API Reference for iOS/macOS
   &#160;<span id="projectnumber">2.3.3</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.20 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">构造函数</a> &#124;
<a href="protocol_j_c_client_callback-p-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">&lt;JCClientCallback&gt;协议 参考<div class="ingroups"><a class="el" href="group___xE7_x99_xBB_xE5_xBD_x95_xE6_xA8_xA1_xE5_x9D_x97.html">登录模块</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#import &lt;<a class="el" href="_j_c_client_callback_8h_source.html">JCClientCallback.h</a>&gt;</code></p>
<div class="dynheader">
类 &lt;JCClientCallback&gt; 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="protocol_j_c_client_callback-p.png" alt=""/>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
构造函数</h2></td></tr>
<tr class="memitem:aa367a4ec84f6cf5b0d0ef22f83522df2"><td class="memItemLeft" align="right" valign="top">(void)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_j_c_client_callback-p.html#aa367a4ec84f6cf5b0d0ef22f83522df2">onLogin:reason:</a></td></tr>
<tr class="separator:aa367a4ec84f6cf5b0d0ef22f83522df2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab6bdf870c036c4ee85aeb6ffcd97e08a"><td class="memItemLeft" align="right" valign="top">(void)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_j_c_client_callback-p.html#ab6bdf870c036c4ee85aeb6ffcd97e08a">onLogout:</a></td></tr>
<tr class="separator:ab6bdf870c036c4ee85aeb6ffcd97e08a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae5a357773fd0a93159fe7d6fd05cf6fc"><td class="memItemLeft" align="right" valign="top">(void)&#160;</td><td class="memItemRight" valign="bottom">- <a class="el" href="protocol_j_c_client_callback-p.html#ae5a357773fd0a93159fe7d6fd05cf6fc">onClientStateChange:oldState:</a></td></tr>
<tr class="separator:ae5a357773fd0a93159fe7d6fd05cf6fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p><a class="el" href="interface_j_c_client.html">JCClient</a> 回调 </p>
</div><h2 class="groupheader">函数文档</h2>
<a id="ae5a357773fd0a93159fe7d6fd05cf6fc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae5a357773fd0a93159fe7d6fd05cf6fc">&#9670;&nbsp;</a></span>onClientStateChange:oldState:</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (void) onClientStateChange: </td>
          <td></td>
          <td class="paramtype">(<a class="el" href="group___xE7_x99_xBB_xE5_xBD_x95_xE6_xA8_xA1_xE5_x9D_x97.html#ga485360c806cb3a83e41ac56a9ad7e709">JCClientState</a>)&#160;</td>
          <td class="paramname"><em>state</em></td>
        </tr>
        <tr>
          <td class="paramkey">oldState:</td>
          <td></td>
          <td class="paramtype">(<a class="el" href="group___xE7_x99_xBB_xE5_xBD_x95_xE6_xA8_xA1_xE5_x9D_x97.html#ga485360c806cb3a83e41ac56a9ad7e709">JCClientState</a>)&#160;</td>
          <td class="paramname"><em>oldState</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>登录状态变化回调</p>
<p>在用户的登录状态发生改变时会收到此回调，登录状态：</p><ul>
<li><a class="el" href="group___xE7_x99_xBB_xE5_xBD_x95_xE6_xA8_xA1_xE5_x9D_x97.html#gga485360c806cb3a83e41ac56a9ad7e709a5a6b582ba8275e39567b419ce05b7860">JCClientStateNotInit</a> : 未初始化</li>
<li><a class="el" href="group___xE7_x99_xBB_xE5_xBD_x95_xE6_xA8_xA1_xE5_x9D_x97.html#gga485360c806cb3a83e41ac56a9ad7e709aa455b750bbf9c4d8e2162eb29255c67f">JCClientStateIdle</a> : 未登录</li>
<li><a class="el" href="group___xE7_x99_xBB_xE5_xBD_x95_xE6_xA8_xA1_xE5_x9D_x97.html#gga485360c806cb3a83e41ac56a9ad7e709a8346c85a19f76aae4e61756dd83c761d">JCClientStateLogining</a> : 登录中</li>
<li><a class="el" href="group___xE7_x99_xBB_xE5_xBD_x95_xE6_xA8_xA1_xE5_x9D_x97.html#gga485360c806cb3a83e41ac56a9ad7e709ae234aaca0d7d17f56ac4646c1ce4c0b7">JCClientStateLogined</a> : 登录成功</li>
<li><a class="el" href="group___xE7_x99_xBB_xE5_xBD_x95_xE6_xA8_xA1_xE5_x9D_x97.html#gga485360c806cb3a83e41ac56a9ad7e709a5bdd4f3d018ad3132fa241156101d2e3">JCClientStateLogouting</a> : 登出中</li>
</ul>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">state</td><td>当前状态值 </td></tr>
    <tr><td class="paramname">oldState</td><td>之前状态值 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="aa367a4ec84f6cf5b0d0ef22f83522df2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa367a4ec84f6cf5b0d0ef22f83522df2">&#9670;&nbsp;</a></span>onLogin:reason:</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (void) onLogin: </td>
          <td></td>
          <td class="paramtype">(bool)&#160;</td>
          <td class="paramname"><em>result</em></td>
        </tr>
        <tr>
          <td class="paramkey">reason:</td>
          <td></td>
          <td class="paramtype">(<a class="el" href="group___xE7_x99_xBB_xE5_xBD_x95_xE6_xA8_xA1_xE5_x9D_x97.html#ga97b82ffd0955bb89c0560316b9359bf6">JCClientReason</a>)&#160;</td>
          <td class="paramname"><em>reason</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>登录结果回调</p>
<p>在调用 <a class="el" href="interface_j_c_client.html#aeab901abd7d38c3fd527c6a330d1e95c">login</a> 方法成功后会收到此回调</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">result</td><td>登录是否成功<ul>
<li>true：登录成功</li>
<li>false：登录失败 </li>
</ul>
</td></tr>
    <tr><td class="paramname">reason</td><td>登录失败原因，当 result 为 false 时该值有效。参见：<a class="el" href="group___xE7_x99_xBB_xE5_xBD_x95_xE6_xA8_xA1_xE5_x9D_x97.html#ga97b82ffd0955bb89c0560316b9359bf6">错误原因</a> </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ab6bdf870c036c4ee85aeb6ffcd97e08a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab6bdf870c036c4ee85aeb6ffcd97e08a">&#9670;&nbsp;</a></span>onLogout:</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">- (void) onLogout: </td>
          <td></td>
          <td class="paramtype">(<a class="el" href="group___xE7_x99_xBB_xE5_xBD_x95_xE6_xA8_xA1_xE5_x9D_x97.html#ga97b82ffd0955bb89c0560316b9359bf6">JCClientReason</a>)&#160;</td>
          <td class="paramname"><em>reason</em></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>登出回调</p>
<p>在调用 <a class="el" href="interface_j_c_client.html#a0d4434928223e0dd2b288e9cb527a314">logout</a> 方法成功会收到此回调</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">reason</td><td>登出失败原因，参见：<a class="el" href="group___xE7_x99_xBB_xE5_xBD_x95_xE6_xA8_xA1_xE5_x9D_x97.html#ga97b82ffd0955bb89c0560316b9359bf6">错误原因</a> </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>该协议的文档由以下文件生成:<ul>
<li>JCSDKOC/JCSDKOC/JCClient/<a class="el" href="_j_c_client_callback_8h_source.html">JCClientCallback.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20
</small></address>
</body>
</html>
